home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Tools / Mac F2C 1.3.3 / Mac F2C Extras / F2C CW MPW⁄ToolServer Tools / MPW READ ME < prev    next >
Text File  |  1995-10-31  |  3KB  |  103 lines

  1. USING F2CMAKE WITH CODEWARRIOR MPW TOOLS AND MAC F2C
  2.  
  3. The folder "MPW/Toolserver Tools" contains three MPW tools: F2CMake,
  4. CWMake and CWOpen. If you are using MPW (not Toolserver), you only need
  5. F2CMake.
  6.  
  7. Metrowerks CodeWarrior comes with the complete MPW environment. If you
  8. are using this environment, you can use F2CMake to integrate Mac F2C
  9. in the build process.
  10.  
  11. F2CMake accepts a command line string containing Unix style options and
  12. one or more filenames to send them in a "kAEf2cEvent" AppleEvent to
  13. Mac F2C which will translate the file(s). If Mac F2C is not currently
  14. running, F2CMake will try to launch it.
  15.  
  16.  
  17. INSTALLATION
  18.  
  19.     - Copy F2CMake into the "Tools" folder of MPW.
  20.  
  21.     - Copy F2C.Help into the MPW folder.
  22.  
  23.     - Set the appropiate options in the "Compiler Interactions..."
  24.       dialog of Mac F2C. You can uncheck all options if you want
  25.       your makefile to control the build process completely, but
  26.       it makes sense to set the interaction mode to "Touch changed
  27.       files" and check the "Add output C/C++ files to active project
  28.       as necessary".
  29.       
  30.  
  31. USAGE
  32.  
  33. First Build:
  34.  
  35.     - Start MPW.
  36.     
  37.     - Use the "Directory" command to move to your project folder.
  38.     
  39.     - Enter a Makefile like this one in a new editor window:    
  40.  
  41. # Sample makefile   
  42. OBJECTS =  Sample.c.o "{F2CLibraries}"main.c.o
  43.  
  44. C           =   MWCPPC
  45. COptions    =   -w full -i "{MWCIncludes}"
  46. Link        =   MWLinkPPC
  47. LinkOptions =   -t APPL -c '????'
  48.  
  49. Sample ƒƒ {OBJECTS}
  50.     {Link} {LinkOptions} ∂
  51.         {OBJECTS} ∂
  52.         "{MWPPCLibraries}"InterfaceLib   ∂
  53.         "{MWPPCLibraries}"MWCRuntime.Lib   ∂
  54.         "{MWPPCLibraries}ANSI C.PPC.Lib"   ∂
  55.         "{MWPPCLibraries}"SIOUX.PPC.Lib   ∂
  56.         "{MWPPCLibraries}"MathLib   ∂
  57.         "{F2CLibraries}"libF77.PPC   ∂
  58.         "{F2CLibraries}"libI77.PPC   ∂
  59.         -o Sample
  60.  
  61. Sample  ƒƒ GenericCFRG.r
  62.     Rez -a -o Test -d APPNAME=∂"Sample∂" GenericCFRG.r
  63.  
  64. .c  ƒ .f
  65.     F2CMake -f -!i8 -A -a -E -ec -R -w66 {Default}.f
  66. # makefile end
  67.       
  68.       This Makefile assumes that you build a PPC application and that
  69.       you have declared and exported a MPW shell variable named
  70.       {F2CLibraries} that contains the pathname to the folder where the
  71.       F2C libraries and "main.c" resides. The file "f2c.h" should be in
  72.       {MWCIncludes} or in the project folder and in {F2CLibraries}.
  73.       
  74.       Please look into the folder "Tom Thompsons PowerMac Book:Code
  75.       Examples PPC ƒ:MacHello" on the CW CD for the "GenericCFRG.r" file
  76.       that is needed to let the Mac OS know that your application contains
  77.       PPC code.
  78.       
  79.       The F2C options are just examples.
  80.       
  81.     - Save the Makefile under the name "Makefile" into your
  82.       project folder.
  83.  
  84.     - Type "Make" and execute the commands written to the MPW worksheet.
  85.       Mac F2C runs faster if you bring it to the foreground.
  86.     
  87.     
  88. Subsequent Builds:
  89.       
  90.     - Edit your Fortran source files.
  91.     
  92.     - Type "BuildProgram <name>", where <name> is the name of the
  93.       target application ("Sample").
  94.       The commands needed to update the project are executed and
  95.       written to the shell window. Mac F2C runs faster if you bring
  96.       it to the foreground.
  97.  
  98.  
  99. If you need help about one of the F2C MPW tools, type
  100.  
  101.     help toolname
  102.  
  103.